import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/login"
    },
    {
      path: "/Home",
      component: resolve => require(["../views/Home.vue"], resolve),
      children: [
        {
          path: "/",
          component: resolve => require(["../views/Console.vue"], resolve),
          meta: {requiresAuth: true}
        },
        {
          // 营养病例 患者列表
          path: "/yybl/patientlist",
          component: resolve => require(["../views/yybl/patientlist.vue"], resolve),
          meta: {requiresAuth: true}
        },
        {
          // 营养病例 患者档案
          path: "/yybl/patientdoc",
          component: resolve => require(["../views/yybl/patientdoc.vue"], resolve),
          meta: {requiresAuth: true}
        },
        {
          // 营养病例 患者生命周期
          path: "/yybl/patientlive",
          component: resolve => require(["../views/yybl/patientlive.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 患者筛查 病人筛查查询
          path: "/yybl/hzsc/brsccx",
          component: resolve => require(["../views/yybl/hzsc/brsccx.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 患者筛查新增
          path: "/yybl/hzsc/brscBCA",
          component: resolve => require(["../views/yybl/hzsc/brscBCA.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/yybl/hzsc/brscMNA",
          component: resolve => require(["../views/yybl/hzsc/brscMNA.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/yybl/hzsc/brscMUST",
          component: resolve => require(["../views/yybl/hzsc/brscMUST.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/yybl/hzsc/brscNSR",
          component: resolve => require(["../views/yybl/hzsc/brscNSR.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/yybl/hzsc/brscPGSGA",
          component: resolve => require(["../views/yybl/hzsc/brscPGSGA.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/yybl/hzsc/brscSGA",
          component: resolve => require(["../views/yybl/hzsc/brscSGA.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/yybl/hzsc/brscSTAMP",
          component: resolve => require(["../views/yybl/hzsc/brscSTAMP.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 患者筛查 病人筛查查询
          path: "/yybl/hzsc/brsccx",
          component: resolve => require(["../views/yybl/hzsc/brsccx.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 患者筛查 病人筛查查询
          path: "/yybl/hzsc/brsccx",
          component: resolve => require(["../views/yybl/hzsc/brsccx.vue"], resolve),
          meta: {requiresAuth: true}
        },


        {
          // 营养病例 营养诊断 营养会诊
          path: "/yybl/yyzd/yyhz",
          component: resolve => require(["../views/yybl/yyzd/yyhz.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养诊断 会诊记录
          path: "/yybl/yyzd/hzjl",
          component: resolve => require(["../views/yybl/yyzd/hzjl.vue"], resolve),
          meta: {requiresAuth: true}
        },{
           // 营养病例 营养诊断 营养诊断
          path: "/yybl/yyzd/yyzd",
          component: resolve => require(["../views/yybl/yyzd/yyzd.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养评估 营养评估 新增综合评估
          path: "/yybl/yypg/xzzhpg",
          component: resolve => require(["../views/yybl/yypg/xzzhpg.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养评估 营养评估 新增体征评估
          path: "/yybl/yypg/xztzpg",
          component: resolve => require(["../views/yybl/yypg/xztzpg.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养评估 营养评估 新增生化评估
          path: "/yybl/yypg/xzshpg",
          component: resolve => require(["../views/yybl/yypg/xzshpg.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养评估 营养评估 新增膳食评估
          path: "/yybl/yypg/xzsspg",
          component: resolve => require(["../views/yybl/yypg/xzsspg.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养评估 营养评估 营养评估
          path: "/yybl/yypg/yypg",
          component: resolve => require(["../views/yybl/yypg/yypg.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养支持 营养处方 新增营养处方
          path: "/yybl/yyzc/yycf/xzyycf",
          component: resolve => require(["../views/yybl/yyzc/yycf/xzyycf.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养支持 治疗膳食 新增治疗膳食
          path: "/yybl/yyzc/zlss/xzzlss",
          component: resolve => require(["../views/yybl/yyzc/zlss/xzzlss.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养支持 治疗膳食 新增食谱
          path: "/yybl/yyzc/zlss/spdz",
          component: resolve => require(["../views/yybl/yyzc/zlss/spdz.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养支持 肠内营养 新增肠内营养
          path: "/yybl/yyzc/cnyy/xzcnyy",
          component: resolve => require(["../views/yybl/yyzc/cnyy/xzcnyy.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养支持 肠外营养 新增肠外营养
          path: "/yybl/yyzc/cwyy/xzcwyy",
          component: resolve => require(["../views/yybl/yyzc/cwyy/xzcwyy.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养检测 医嘱检测
          path: "/yybl/yyjc/yzjc",
          component: resolve => require(["../views/yybl/yyjc/yzjc.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养检测 营养指标
          path: "/yybl/yyjc/yyzb",
          component: resolve => require(["../views/yybl/yyjc/yyzb.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养检测 体检指标
          path: "/yybl/yyjc/tjzb",
          component: resolve => require(["../views/yybl/yyjc/tjzb.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养检测 生化检查
          path: "/yybl/yyjc/shjc",
          component: resolve => require(["../views/yybl/yyjc/shjc.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养病例 病程
          path: "/yybl/yybl/bc",
          component: resolve => require(["../views/yybl/yybl/bc.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养病例 营养病例
          path: "/yybl/yybl/yybl",
          component: resolve => require(["../views/yybl/yybl/yybl.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          // 营养病例 营养宣教 营养宣教
          path: "/yybl/yyxj/yyxj",
          component: resolve => require(["../views/yybl/yyxj/yyxj.vue"], resolve),
          meta: {requiresAuth: true}
        },

         // 肠内管理begin
        {
          path: "/cngl/cnpz",
          component: resolve => require(["../views/cngl/cnpz.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/cngl/cnbq",
          component: resolve => require(["../views/cngl/cnbq.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/cngl/yyyqs",
          component: resolve => require(["../views/cngl/yyyqs.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/cngl/yyzlcf",
          component: resolve => require(["../views/cngl/yyzlcf.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/cngl/cntj",
          component: resolve => require(["../views/cngl/cntj.vue"], resolve),
          meta: {requiresAuth: true}
        },{
          path: "/cngl/plzxyz",
          component: resolve => require(["../views/cngl/plzxyz.vue"], resolve),
          meta: {requiresAuth: true}
        },
        // 肠内管理end

        {
          path: "/platform/ToInterceptors",
          component: resolve => require(["../views/platform/ToInterceptors.vue"], resolve),
          meta: {requiresAuth: true}
        },
        // {
        //   path: "/platform/ToStrategy",
        //   component: resolve => require(["../views/platform/ToStrategy.vue"], resolve),
        //   meta: {requiresAuth: true}
        // },
        // {
        //   path: "/platform/ToChannels",
        //   component: resolve => require(["../views/platform/ToChannels.vue"], resolve),
        //   meta: {requiresAuth: true}
        // },
        // {
        //   path: "/platform/Publish",
        //   component: resolve => require(["../views/platform/Publish.vue"], resolve),
        //   meta: {requiresAuth: true}
        // },
        // {
        //   path: "/platform/PublishAdd",
        //   component: resolve => require(["../views/platform/PublishAdd.vue"], resolve),
        //   meta: {requiresAuth: true}
        // },
        // {
        //   path: "/platform/PublishEdit",
        //   component: resolve => require(["../views/platform/PublishEdit.vue"], resolve),
        //   meta: {requiresAuth: true}
        // },
        {
          path: "/platform/HierarchyChart",
          component: resolve => require(["../views/platform/HierarchyChart.vue"], resolve),
          meta: {requiresAuth: true}
        },
        {
          path: "/platform/TopologyChart",
          component: resolve => require(["../views/platform/TopologyChart.vue"], resolve),
          meta: {requiresAuth: true}
        },
        {
          path: "/demo/TreeGrid",
          component: resolve => require(["../views/demo/TreeGrid.vue"], resolve),
          meta: {requiresAuth: true}
        },
        {
          path: "/demo/DataGrid",
          component: resolve => require(["../views/demo/DataGrid.vue"], resolve),
          meta: {requiresAuth: true}
        },
        {
          path: "/demo/MutiTabs",
          component: resolve => require(["../views/demo/MutiTabs.vue"], resolve),
          meta: {requiresAuth: true}
        },
        {
          path: "/account/SICardInfoQuery",
          component: resolve => require(["../views/account/SICardInfoQuery.vue"], resolve),
          meta: {requiresAuth: true}
        },
        {
          path: "/account/pwdMod",
          component: resolve => require(["../views/account/pwdMod.vue"], resolve),
          meta: {requiresAuth: true}
        },
        // 系统管理
        {
          path: "/privilege/ToMenus",
          components:{
            ToMenus:resolve => require(["../views/privilege/ToMenus.vue"], resolve)
          },
          meta: {requiresAuth: true}
        },
        {
          path: "/privilege/ToRoles",
          components:{
            ToRoles:resolve => require(["../views/privilege/ToRoles.vue"], resolve)
          },
          meta: {requiresAuth: true}
        },
        {
          path: "/privilege/ToUsers",
          components:{
            ToUsers:resolve => require(["../views/privilege/ToUsers.vue"], resolve)
          },
          meta: {requiresAuth: true}
        }

      ]
    },
    {
      path: "/login",
      component: resolve => require(["../views/Login.vue"], resolve)
    }
  ]
})
